# -*- coding:utf-8 -*-
import string
template_str = string.Template('this is $thing')
print template_str.substitute({'thing':5})
print template_str.substitute({'thing':'test'})
print template_str.substitute(thing='test2')
print template_str.substitute(thing=5)
